package com.some;

import java.util.Scanner;

public class BaiDu_12_1 {
    public void moveStation(char[] move) {
        int[] station = {0, 0};
        for (char c : move) {
            if (c == 'L') {
                // 左
                station[0]--;
            } else if (c == 'R') {
                // 右
                station[0]++;
            } else if (c == 'U') {
                // 上
                station[1]++;
            } else if (c == 'D') {
                // 下
                station[1]--;
            }
        }
        System.out.println("(" + station[0] + "," + station[1] + ")");
    }
}

class Main_12_1 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        BaiDu_12_1 baiDu_12_1 = new BaiDu_12_1();
        baiDu_12_1.moveStation(sc.next().toCharArray());
    }
}
